package behavior.state;

import java.util.Scanner;

/**
 * @author lzp
 * @Date:2023/3/7
 * @description: 状态模式测试类
 */
public class StateDemo {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		BotContext bot = new BotContext();
		for (; ; ) {
			System.out.print("> ");
			String input = scanner.nextLine();
			String output = bot.chat(input);
			System.out.println(output.isEmpty() ? "(no reply)" : "< " + output);
		}
	}

}
